package core.entities;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;


public class Projectile extends Entity
{
	protected int damage = 10;
	protected int speed = 350;
	protected float angle = 0;
	
	public Projectile(int x, int y, Image sprite, float angle)
	{
		super(x, y, sprite);
		this.angle = angle;
		dx = (float) (speed * Math.cos( Math.toRadians(angle) ));
		dy = (float) (speed * -Math.sin( Math.toRadians(angle) ));
		this.sprite.setRotation(-angle);
	}

	@Override
	public void render(Graphics g)
	{
		super.render(g);
	}
	
	@Override
	public void update(int delta)
	{
		super.update(delta);
	}
	
	public boolean isOutBound() //Check bounds for deletion
	{
		if(x+w<0 || y+h<88 || x>1024 || y>600)
			return true;
		else
			return false;
	}
}
